#include "db.h"
 
 int main(void)
 {
    DB *db;
    if((db=db_open("db4", O_RDWR| O_CREAT| O_TRUNC, FILE_MODE)) == NULL)
    {
        err_sys("db_open error");
    }
    
    if( db_store(db,"Alpha","data1", DB_INSERT)!= 0)
    {
        err_quit("db_store errror for alpha");
    }
    if( db_store(db,"beta","Data for beta", DB_INSERT)!= 0)
    {
        err_quit("db_store errror for beta");
    }
    if( db_store(db,"gamma","record3", DB_INSERT)!= 0)
    {
        err_quit("db_store errror for gamma");
    }
    db_close(db);
    exit(0);
 }